'This is an 'effects' class, that will fade a scene in or out
'by increasing the alpha channel on all objects
Public FadeInterval As Single
Public AmFading As Boolean
Public CanFade As Boolean
Private mlPixelShaderHandle As Long
'Methods used during fading
'This will update the global params for fading the scene in, or out
'Fading is simply accomplished by adding or subtracting the amount of light in the scene until
'it reaches a desired level. Since the background is black anyway, we could have also
'simply slowly turned up the alpha on each of the objects, this is just the way I chose.
Public Sub Fade(ByVal nInterval As Long)
If Not CanFade Then Exit Sub
FadeInterval = nInterval
AmFading = True
End Sub
Public Sub UpdateFade(oPuck As cPuck, oPaddle() As cPaddle, oTable As cTable, oRoom As cRoom)
Dim fDoneFading As Boolean
fDoneFading = True
fDoneFading = oPuck.FadeMesh(FadeInterval) And oPaddle(0).FadeMesh(FadeInterval) And oPaddle(1).FadeMesh(FadeInterval) And oTable.FadeMesh(FadeInterval) And oRoom.FadeMesh(FadeInterval)